/**
 * Witontek.com.
 * Copyright (c) 2012-2017 All Rights Reserved.
 */
package test.random;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 * 
 * @author Long
 * @version $Id: RandomDate.java, v 0.1 2017年9月7日 上午10:10:23  xiaolong.ma  Exp $
 */
public class RandomDate {

    /**
     * 
     * @param args
     */
    public static void main(String[] args) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        String s = sdf.format(new Date());
        System.out.println(s);
        Random random1 = new Random();
        System.out.println(random1.nextInt());
        System.out.println(random1.nextFloat());
        System.out.println(random1.nextBoolean());
        Random random2 = new Random();
        System.out.println(random2.nextInt());
        System.out.println(random2.nextFloat());
        System.out.println(random2.nextBoolean());
        {
            Random random = new Random();
            for (int i = 0; i < 10; i++) {
                System.out.println(String.format("%04d", Math.abs(random.nextInt()) % 10000));
            }
        }
    }

}
